import numpy as np
import pandas as pd


def main():
    ser1 = pd.Series(data=[120, 380, 250, 360], index=['一季度', '二季度', '三季度', '四季度'])
    print(f'ser1: {ser1}')
    ser1 += 10
    print(f'ser1: {ser1}')
    ser2 = pd.Series({'一季度': 320, '二季度': 180, '三季度': 300, '四季度': 405})
    print(f'ser2: {ser2}')
    ser3 = ser1 + ser2
    print(f'ser3: {ser3}')
    print(ser1[2])
    print(ser1['三季度'])
    ser1['一季度'] = 380
    print(f'ser1: {ser1}')
    print(ser1.describe())

    ser5 = pd.Series(range(5))
    print(f'ser5: {ser5}')
    print(ser5.where(ser5 > 0))
    print(ser5.where(ser5 > 1, 10))
    print(ser5.mask(ser5 > 1, 10))


if __name__ == '__main__':
    main()
